package cat.joronya.supermanager.service;

import android.os.Message;
import android.util.Log;
import cat.joronya.supermanager.Supermanager;

public abstract class CreatePrivateLeagueHandler extends BaseHandler {

	@Override
	public void handleMessage(Message msg) {
		// get data from msg
		status = msg.getData().getInt(Supermanager.STATUS_MESSAGE);
		Log.d(TAG, "CreatePrivateLeagueHandler received status: " + status);

		if (status == Supermanager.PRIVATE_LEAGUE_CREATE_OK) {
			createOk(msg);
		}

		super.handleMessage(msg);
	}

	/**
	 * Executed when received PRIVATE_LEAGUE_CREATE_OK
	 */
	public abstract void createOk(Message msg);

}
